FROM ubuntu

MAINTAINER LX

RUN echo "deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse" > /etc/apt/source.list 
RUN echo "deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse" > /etc/apt/source.list 
RUN echo "deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse" > /etc/apt/source.list 
RUN echo "deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse" > /etc/apt/source.list 
RUN echo "deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse" > /etc/apt/source.list 
RUN apt-get update

RUN apt-get install -y openssh-server
RUN mkdir -p /var/run/sshd
RUN mkdir -p /root/.ssh

RUN sed -ri 's/session    required     pam_loginuid.so/#session    required     pam_loginuid.so/g' /etc/pam.d/sshd

ADD run.sh /run.sh
RUN chmod 755 /run.sh

EXPOSE 22

CMD ["/run.sh"]